@extends('admin.common.common')

@section('head')
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="stylesheet" href="/admin/static/h-ui.admin/css/bootstrap.min.css">
    <link rel="stylesheet" href="/admin/lib/datatables/datatable.css">
@endsection



@section('body')
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span> 房源属性中心 <span class="c-gray en">&gt;</span> 房源属性首页
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <span class="l">
        <a href="javascript:;" class="btn btn-danger radius deleteAll"><i class="icon-trash"></i> 批量删除</a>
        <a href="{{route('admin.fangattr.create')}}" class="btn btn-primary radius"><i class="icon-plus"></i> 添加房源属性</a>
    </span>
    <span class="r">共有数据：<strong></strong> 条</span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg table-sort">
        <thead>
        <tr class="text-c">
            <th width="25"><input type="checkbox" name="checkall" value=""></th>
            <th width="25">ID</th>
            <th width="100">pid</th>
            <th width="100">字段名称</th>
            <th width="100">属性名</th>
            <th width="130">图标</th>
            <th width="50">操作</th>
        </tr>
        </thead>
        <tbody>
            @foreach($data as $val)
                <tr>
                    <td><input type="checkbox" name="checkall" value=""></td>
                    <td>{{$val->id}}</td>
                    <td>{{$val->pid}}</td>
                    <td>{{$val->filed_name}}</td>
                    <td>{{$val->name}}</td>
                    @if($val->icon)

                    @else
                        <img src="{{$val->icon}}" alt="">
                    @endif
                    <td><img src="{{$val->icon}}" alt="" width="50" height="50"></td>
                    <td>
                        <a href="" class="btn btn-success" >编辑</a>
                        <a href="" class="btn btn-danger" >删除</a>
                    </td>
                </tr>
            @endforeach
        </tbody>
    </table>
    <div id="pageNav" class="pageNav"></div>
    </div>

@endsection


@section('js')
    <script src="/admin/static/h-ui.admin/js/layer/layer.js"></script>
    <script src="/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>


@endsection
